package com.yun.zf.common.mapstruct.admin;

import com.yun.zf.common.admin.dto.community.CommunityBasicDto;
import com.yun.zf.common.admin.model.community.CommunityAddMo;
import com.yun.zf.common.app.domain.ZfCommunity;
import com.yun.zf.common.esIndex.CommunityIndexTemplate;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

@Mapper
public interface CommunityMapper {
    CommunityMapper INSTANCE = Mappers.getMapper(CommunityMapper.class);

    CommunityBasicDto communityDoToMo(ZfCommunity community);

    @Mappings({
            @Mapping(source="id", target="cid")

    })
    CommunityIndexTemplate communityDoIndex(ZfCommunity community);

    ZfCommunity addMoToCommunity(CommunityAddMo communityAddMo);
}
